package com.myapp.struts.menu;

import java.util.ArrayList;

public class GBDinnerHTML {

    private static GBDinnerHTML gbDinnerHTMLObj;
    ArrayList<FoodItems> gbDinnerHTMLArray = new ArrayList<FoodItems>();

    public static synchronized GBDinnerHTML getSingletonObject() {
        if (gbDinnerHTMLObj == null) {
            gbDinnerHTMLObj = new GBDinnerHTML();
        }
        return gbDinnerHTMLObj;
    }

    public Object clone() throws CloneNotSupportedException {
        throw new CloneNotSupportedException();
    }

    public String getGBDinnerHTML(String fileLoc) {
        String fileName = "";
        MenuRead menuReadObj = new MenuRead();
        gbDinnerHTMLArray = menuReadObj.ReadMenu(Constants.GREAT_BRITAN);
        
        MenuGenerate menuGenerateObj = new MenuGenerate();
        gbDinnerHTMLArray = menuGenerateObj.GenerateMenu(gbDinnerHTMLArray, Constants.DINNER);

        MenuFormat menuFormatObj = new MenuFormat();
        fileName = menuFormatObj.FormatMenu(gbDinnerHTMLArray, Constants.HTML, fileLoc);
        return fileName;

    }
}
